package com.ssh.controller;

import com.ssh.pojo.Dept;
import com.ssh.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private DeptService deptService;

    //添加部门
    @RequestMapping("/add.html")
    public String add(Dept dept) {
        deptService.addDept(dept);
        return "/dept_add.jsp";
    }
}
